#pragma once
// -------------------------------------------------
// BlinKit - BlinKit Library
// -------------------------------------------------
//   File Name: page_popup_session.h
// Description: PagePopupSession Class
//      Author: Ziming Li
//     Created: 2022-05-15
// -------------------------------------------------
// Copyright (C) 2022 MingYang Software Technology.
// -------------------------------------------------

#ifndef BLINKIT_PAGE_POPUP_SESSION_H
#define BLINKIT_PAGE_POPUP_SESSION_H

namespace BlinKit {

class PagePopupHostWindow;

class PagePopupSession
{
public:
    PagePopupSession(void) = default;

    void Start(HWND hParent, PagePopupHostWindow *host);
    void Stop(void);

    bool ForwardMouseMessage(HWND hParent, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &result);
private:
    static ATOM RegisterClass(void);
    static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
    static BOOL OnNCCreate(HWND hwnd, LPCREATESTRUCT lpCreateStruct);

    PagePopupHostWindow *m_host = nullptr;
};

} // namespace BlinKit

#endif // BLINKIT_PAGE_POPUP_SESSION_H
